Leadtools.Forms.Ocr Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Run(String,String,Generic IList,OcrDocumentFormat,OcrProgressCallback) Method
See Also 
Leadtools.Forms.Ocr Namespace > IOcrAutoRecognizeManager Interface > Run Method : Run(String,String,Generic IList,OcrDocumentFormat,OcrProgressCallback) Method



imageFileName
The name of the file containing the image.
documentFileName
The name of the result document file.
zoneFileNames
Optional list of file names for prepared zone files for the pages. This parameter can be a null (Nothing in Visual Basic) reference.
documentFormat
The output document format.
callback
Optional callback to show operation progress.
imageFileName
The name of the file containing the image.
documentFileName
The name of the result document file.
zoneFileNames
Optional list of file names for prepared zone files for the pages. This parameter can be a null (Nothing in Visual Basic) reference.
documentFormat
The output document format.
callback
Optional callback to show operation progress.
(Deprecated) Converts an image file on disk to a document file in the specified document format.

Syntax

Visual Basic (Declaration) 
Overloads Overridable Sub Run( _
   ByVal imageFileName As String, _
   ByVal documentFileName As String, _
   ByVal zoneFileNames As IList(Of String), _
   ByVal documentFormat As OcrDocumentFormat, _
   ByVal callback As OcrProgressCallback _
) 
Visual Basic (Usage)Copy Code
Dim instance As IOcrAutoRecognizeManager
Dim imageFileName As String
Dim documentFileName As String
Dim zoneFileNames As IList(Of String)
Dim documentFormat As OcrDocumentFormat
Dim callback As OcrProgressCallback
 
instance.Run(imageFileName, documentFileName, zoneFileNames, documentFormat, callback)

Parameters

imageFileName
The name of the file containing the image.
documentFileName
The name of the result document file.
zoneFileNames
Optional list of file names for prepared zone files for the pages. This parameter can be a null (Nothing in Visual Basic) reference.
documentFormat
The output document format.
callback
Optional callback to show operation progress.

Remarks

(Deprecated) Use Run(string, string, IList<string>, DocumentFormat, OcrProgressCallback) instead.

This method will perform the following operations:

  1. Create an IOcrDocument object to store the pages into.
  2. Load the raster image pages from imageFileName add them the IOcrDocument.Pages collection using IOcrPageCollection.AddPage.
  3. If zoneFileNames contains a valid zone file name for the current page (the index in this array matches the index of the page being loaded), the zones are loaded with IOcrPage.LoadZones and applied to the page. If zoneFileNames is a null (Nothing in Visual Basic) reference or its entry for the current page is a null reference, auto-decomposing of the page is performed instead with IOcrPage.AutoZone.
  4. Calls IOcrPage.Recognize on each IOcrPage to get the OCR data of the page .
  5. Saves the IOcrDocument object to the result file name specified in documentFileName using the format specified in documentFormat.
  6. Finally, deletes the IOcrDocument object by calling IOcrDocument.Dispose.

You can use the OcrProgressCallback to show the operation progress or to abort it. For more information and an example, refer to OcrProgressCallback.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Run(String,String,Generic IList,OcrDocumentFormat,OcrProgressCallback) requires an OCR module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features